/*******************************************************************************
* @file    fins_doubly_linked_list.c
* @author  Fins
* @brief   
* @time    2020-11-17 20:09:54 Tuesday
* @codeing UTF-8
* @license
*     Copyright 2020 Fins
*
*     Licensed under the Apache License, Version 2.0 (the "License");
*     you may not use this file except in compliance with the License.
*     You may obtain a copy of the License at
*
*         http://www.apache.org/licenses/LICENSE-2.0
*
*     Unless required by applicable law or agreed to in writing, software
*     distributed under the License is distributed on an "AS IS" BASIS,
*     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*     See the License for the specific language governing permissions and
*     limitations under the License.
* @verbatim
================================================================================
                        ##### xxxxxxxxxxxxxxxxxxxxxxx #####
================================================================================
* @endverbatim
* @attention
*******************************************************************************/



/* Includes start *************************************************************/
/*     Lib files ****************************** */

/*     User files ***************************** */
#include "../inc/fins_doubly_linked_list.h"

/* Includes end ***************************************************************/

/* Define start ***************************************************************/



/* Define end *****************************************************************/

/* Typedef start **************************************************************/



/* Typedef end ****************************************************************/

/* Global variable start ******************************************************/



/* Global Variable end ********************************************************/

/* Static function declaration start ******************************************/



/* Static function declaration end ********************************************/

/* function start *************************************************************/

/**
  * @brief Get list lenth
  * @param[in] listHead: Linked list head pointer
  * @retval List length
  */
fuint32 FdllGetLen(fdll_node_s* listHead)
{
    fuint32 i = 0;
    fdll_node_s* tempNode;
    for(tempNode = listHead->next;
        tempNode != listHead;
        tempNode = tempNode->next,i++);
    return i;
}


/* function end ***************************************************************/

////////////////////////////////- END OF FILE  -////////////////////////////////
